<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>webSocket</title>
    <link rel="stylesheet" href="/res/css/websocket.css">
    <script src="/res/lib/jquery-1.12.4.min.js"></script>
    <script src="/res/js/chatroom.js"></script>
    <script src="/res/js/sockjs.js"></script>
    <script src="/res/js/stomp.js"></script>
</head>
<body>
    <div>
        <a href="javascript: test();">websocket发送信息</a>
    </div>
    <div>
        <div style="float:left;width:40%">
            <p>请选择你是谁：</p>
            <select id="selectName" onchange="sendAloneUser();">
                <option value="1">请选择</option>
                <option value="ALong">ALong</option>
                <option value="AKan">AKan</option>
                <option value="AYuan">AYuan</option>
                <option value="ALai">ALai</option>
                <option value="ASheng">ASheng</option>
            </select>
            <div class="chatWindow">
                <p style="color:darkgrey">群聊：</p>
                <section id="chatRecord" class="chatRecord">
                    <p id="titleval" style="color:#CD2626;"></p>
                </section>
                <section class="sendWindow">
                    <textarea name="sendChatValue" id="sendChatValue" class="sendChatValue"></textarea>
                    <input type="button" name="sendMessage" id="sendMessage" class="sendMessage" onclick="sendMassMessage()" value="发送">
                </section>
            </div>
        </div>


        <div style="float:right; width:40%">
            <p>请选择你要发给谁：</p>
            <select id="selectName2">
                <option value="1">请选择</option>
                <option value="ALong">ALong</option>
                <option value="AKan">AKan</option>
                <option value="AYuan">AYuan</option>
                <option value="ALai">ALai</option>
                <option value="ASheng">ASheng</option>
            </select>
            <div class="chatWindow">
                <p style="color:darkgrey">单独聊：</p>
                <section id="chatRecord2" class="chatRecord">
                    <p id="titleval" style="color:#CD2626;"></p>
                </section>
                <section class="sendWindow">
                    <textarea name="sendChatValue2" id="sendChatValue2" class="sendChatValue"></textarea>
                    <input type="button" name="sendMessage" id="sendMessage" class="sendMessage" onclick="sendAloneMessage()" value="发送">
                </section>
            </div>
        </div>
    </div>

    <script>
        /*$(function () {

            var socket = new SockJS("/websocket")
            stompClient = Stomp.over(socket);
            stompClient.connect({}, function (frame) {
                stompClient.subscribe("/user/e9ca23d68d884d4ebb19d07889727dae/messCount", function (res) {

                    console.log(res);

                })
            });


        });*/
    </script>
</body>
</html>